<?php 

require_once 'domain/ConfParam.php';
require_once(APPPATH.'libraries/MY_Model.php');

class M_conf_param extends MY_Model {

	function M_conf_param()
	{
		parent::MY_Model('conf_params','param_name');
	}

	/*****************************************************
	 * GENERAL
	 ****************************************************/

	protected function afromEntityToDb(ConfParam $param){
		return array(
			'param_name'	=> $param->name,
			'param_value'	=> $param->value
		);
	}

	protected function  afromDbToEntity(array $p_param) {
		$p = new ConfParam();
		$p->name	= $p_param['param_name'];
		$p->value	= $p_param['param_value'];
		return $p;
	}

	/*****************************************************
	 * ACCESO A DATOS
	 ****************************************************/
	
}

?>
